<extend name="Common@Base/iframelayout"/>
<block name="body">
    <nav class="case-detail-top">
        <div class="container-fluid">
            <div class="row">
            <span class="btn-group selected-action" style="left: 35%;">
                <h3>厦门市湖里区文明单位创建动态管理系统</h3>
            </span>
                <span class="pull-right">
                <button style="margin-right:10px" class="btn-small" type="submit" onclick="javascript:location.href='/home/index/login'">登  陆</button>
                </span>
            </div>
        </div>
    </nav>
    <div class="casedetail-content" style="background: #eee url(images/register-bg.jpg) center center no-repeat;">
        <div class="container-fluid">
            <div class="row">
                <div class="col-sm-6" style="left: 25%;margin-top: 35px;">
                    <div class="panel panel-default">
                        <div class="tab-content">
                            <div class="tab-pane fade in active" id="debt-tel">
                                <form id="register_form" name="register_form" method="post" action="/home/index/doRegister">
                                    <div class="panel-body">
                                        <div class="row row-inside">
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">单位全称<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="text" name="account" value="" placeholder="单位全称为您的登录用户名">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">

                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">单位属性<span class="text-important">*</span></div>
                                                    <div class="dropdown col-sm-9 dropdown-block">
                                                        <a class="btn btn-default" data-toggle="dropdown"><span id="type_name" name="type_name" class="option-name">单位</span> <span
                                                                class="caret"></span>
                                                        </a>
                                                        <ul class="dropdown-menu dropdown-option-menu">
                                                            <li><a data-value="1" role="button">单位</a></li>
                                                            <li><a data-value="2" role="button">学校</a></li>
                                                            <li><a data-value="3" role="button">社区</a></li>
                                                        </ul>
                                                        <input name="attribute" class="option-value" type="hidden" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">

                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">所属级别<span class="text-important">*</span></div>
                                                    <div class="col-sm-9 dropdown dropdown-block">
                                                        <a class="btn btn-default" data-toggle="dropdown"><span id="rank_name" name="rank_name" class="option-name">省级</span> <span
                                                                class="caret"></span>
                                                        </a>
                                                        <ul class="dropdown-menu dropdown-option-menu">
                                                            <li><a data-value="1" role="button">省级</a></li>
                                                            <li><a data-value="2" role="button">市级</a></li>
                                                            <li><a data-value="3" role="button">区级</a></li>
                                                        </ul>
                                                        <input name="rank" class="option-value" type="hidden" value="1">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">联系人<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="text" name="contact" value="">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">联系电话<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="text" name="contact_phone" value="">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">联系邮箱<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="text" name="email" value="">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">登录密码<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="password" id="password" name="password" value="">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-sm-12">
                                                <div class="form-group">
                                                    <div class="col-sm-3 text-right vertical-middle_text">确认密码<span class="text-important">*</span></div>
                                                    <div class="col-sm-9">
                                                        <input class="form-control" type="password" name="repassword" value="">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group text-center">
                                            <button class="btn-full" type="submit">注 册</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <script src="/Public/Common/js/alertify/alertify.js"></script>
                    <script src="/Public/Common/js/echarts.js"></script>
                    <script src="/Public/Common/js/daterangepicker/moment.js"></script>
                    <script src="/Public/Common/js/daterangepicker/daterangepicker.js"></script>
                    <script src="/Public/Common/js/daterangepicker/daterangepicker_cn.js"></script>
                    <script src="/Public/Common/js/easyticker/jquery.easing.min.js"></script>
                    <script src="/Public/Common/js/easyticker/jquery.easy-ticker.js"></script>
                    <script src="/Public/Common/js/uploadify/jquery.uploadify.min.js"></script>
                    <script src="/Public/Common/js/bootstrap-treeview.js"></script>
                    <script src="/Public/Common/js/zc2017.js"></script>
                    <script src="/Public/Common/js/staff.tree.js"></script>

                    <script type="text/javascript">
                        $(document).ready(function () {
                            $("#register_form").validate({
                                submitHandler: function () {
                                    $.post($("#register_form").attr("action"), $("#register_form").serialize(), function (data) {
                                        if (data === "0") {
                                            alertify.alert("注册成功，请联系管理员开通账号!", function () {
                                                location.reload();
                                            });
                                        } else {
                                            alertify.alert(data);
                                        }
                                    }).error(function (msg, url, line) {
                                        alert(msg.responseText);
                                    });
                                },
                                ignore: "",
                                rules: {
                                    account: {
                                        required: true
                                    },
                                    contact: {
                                        required: true
                                    },
                                    contact_phone: {
                                        required: true,
                                        isPhone: true
                                    },
                                    email: {
                                        required: true,
                                        email: true
                                    },
                                    password: {
                                        required: true,
                                        minlength: 6
                                    },
                                    repassword: {
                                        required: true,
                                        equalTo: "#password"
                                    }
                                },
                                messages: {
                                    account: {
                                        required: "请填写单位名称"
                                    },
                                    contact: {
                                        required: "请填写联系人"
                                    },
                                    phone: {
                                        required: "请填写联系电话",
                                        isPhone: "请填写正确的联系电话"
                                    },
                                    email: {
                                        required: "填写邮箱",
                                        required: "填写正确邮箱"
                                    },
                                    password: {
                                        required: "填写密码",
                                        minlength: "密码长度必需大于6位"
                                    },
                                    repassword: {
                                        required: "填写重复密码",
                                        equalTo: "密码和重复密码不一致"
                                    }
                                }
                            });

                        });

                    </script>
                </div>
            </div>
        </div>

    </div>
</block>